package datastructures;

import java.io.Serializable;

/**
 * Class containing coordinates
 * @author Fredrik
 *
 */
public class Coordinate implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 6891033021397501452L;
	
	private int x;
	
	private int y;
	
	/**
	 * Constructor creating a coordinate at x,y
	 * @param x
	 * @param y
	 */
	public Coordinate(int x,int y){
		this.x = x;
		this.y = y;
	}

	/**
	 * Get X
	 * @return x
	 */
	public int getX() {
		return this.x;
	}

	/**
	 * setX sets the x member
	 * @param x
	 */
	public void setX(int x) {
		this.x = x;
	}

	/**
	 * Get Y
	 * @return y
	 */
	public int getY() {
		return this.y;
	}

	/**
	 * setY sets the y member
	 * @param y
	 */
	public void setY(int y) {
		this.y = y;
	}
	
	/** (non-Javadoc)
	 * @see java.lang.Object#clone()
	 */
	@Override
	public Object clone(){
		return new Coordinate(this.x,this.y);
	}

}
